import React,{useEffect,useRef} from 'react'

const useDebounce = (callback,delay)=>{

    const timer = useRef(null);

   const setTimeout=((...args)=>{
        timer.current = setTimeout(()=>{
            clearInterval(timer.current)
        })
        callback.apply(this,args)
   },delay)

   useEffect
}



export default useDebounce
